<?php 

include_once './function.php';

$users = include_once './user.php';


foreach ($users as  $user) {
	if($user['username']==$_POST['username']){
		if($user['password']==md5($_POST['password'])){
			session_start();
			$_SESSION['username']=$user['username'];
			$_SESSION['nikename']=$user['nikename'];
			success('你登录成功','./index.php',3);
			exit;
		}

	}
}
error('帐号或者密码错误','./index.php',3);














 ?>